package com.linx.notice.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linx.common.core.domain.dto.OssDTO;
import com.linx.common.translation.annotation.TranslationSupper;
import com.linx.common.translation.constant.TransConstant;
import com.linx.notice.domain.InfoRealease;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 信息发布视图对象 info_realease
 *
 * @author 泽智科技
 * @date 2024-10-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = InfoRealease.class)
public class InfoRealeaseVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long infoReleaseId;

    /**
     * 标题
     */
    @ExcelProperty(value = "标题")
    private String infoTitle;

    /**
     * 分类
     */
    @ExcelProperty(value = "分类")
    private Long infoTypeId;

    private String infoTypeName;
    /**
     * 发布范围
     */
    @ExcelProperty(value = "发布范围")
    private Long infoScopeId;

    /**
     * 发布时间类型 1 立即发生 2 定时发送
     */
    private String realeaseTimeType;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss")
    private Date realeaseTime;




    /**
     * 信息头图
     */
    @ExcelProperty(value = "信息头图")
    private String infoHeaderPicId;

    /**
     * 信息头图url
     */
    @TranslationSupper(type = TransConstant.OSS_ID_TO_URL, mapper = "infoHeaderPicId")
    private String infoHeaderPicIdImgUrl;
    /**
     *
     */
    @ExcelProperty(value = "")
    private String infoContent;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 备注
     */
    private String typeName;

    /**
     * 备注
     */
    private String scopeName;

    private Long createBy;

    /**
     * 创建人账号
     */
    @TranslationSupper(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
    @ExcelProperty(value = "创建人账号")
    private String createByName;

    /**
     * 附件
     */
    private List<Long> fileUrls;

    @TranslationSupper(type = TransConstant.BIZ_TO_OSS, mapper = "infoReleaseId" ,other = "info_realease_header_pic")
    private List<OssDTO> ossDTOList;

    /**
     * 信息发布类型（1，代表草稿，2代表发布）
     */
    private String realeaseType;


    /**
     * 信息发布状态（1，已发送，2未发送）
     */
    private String realeaseStatus;
    /**
     * banner排序
     */
    private Long bannerSort;

    /**
     * banner标志（1代表是 1代表否）
     */
    private String bannerFlag;

    /**
     * banner
     */
    private Long bannerId;
    /**
     *     是否跳转（0代表是 1代表否）
     */

    private String bannerLinkFlag;

    /**
     * bannerUrl
     */
    @TranslationSupper(type = TransConstant.OSS_ID_TO_URL, mapper = "bannerId")
    private String bannerUrl;

    @TranslationSupper(type = TransConstant.BIZ_TO_OSS, mapper = "infoReleaseId" ,other = "info_realease_banner_id")
    private List<OssDTO> bannerOssDTOList;



}
